//
//  SGMessageViewController.m
//  MomHelp
//
//  Created by xuguoyong on 16/8/19.
//  Copyright © 2016年 hudongkeji. All rights reserved.
//

#import "SGMessageViewController.h"
#import "SGMessageCellTableViewCell.h"
@interface SGMessageViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong) UITableView *tabeView;
@property (nonatomic,strong) NSMutableArray *dataSource;
@end


@implementation SGMessageViewController



- (void)viewDidLoad {
    [super viewDidLoad];
    self.tabeView = [self addTableViewWithDelegate:self style:UITableViewStyleGrouped];
    [self.tabeView registerNib:[UINib nibWithNibName:@"SGMessageCellTableViewCell" bundle:nil] forCellReuseIdentifier:@"messageCell"];
 
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 2;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    if (section == 0) {
        return 1;
    }
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    
    if (indexPath.section == 0) {
        SGMessageCellTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"messageCell"];
        return cell;
    }
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }
    cell.textLabel.text = @"待编辑";
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        return 177.0f;
    }
    return 44.0f;
}


@end
